package com.angis.fx.handler;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.database.Cursor;

import com.angis.fx.db.BusinessTypeDBHelper;

public class BusinessTypeDBHandler {

	public static List<String> getAll(Context pContext) {
		BusinessTypeDBHelper lDBHelper = new BusinessTypeDBHelper(pContext);
		Cursor lCursor = lDBHelper.getAllBusinessTypes();
		List<String> lResultList = new ArrayList<String>();
		if(lCursor.moveToFirst()) {
			do {
				String lType = lCursor.getString(1);
				lResultList.add(lType);
			} while (lCursor.moveToNext());
		}
		lCursor.close();
		lDBHelper.closeDB();
		return lResultList;
	}
	
}
